package com.fnzn.entranceGuard.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author sxf
 * @since 2018-06-25
 */
@Data
@TableName("guard_qr_info")
public class GuardQrInfo extends Model<GuardQrInfo> {

    private static final long serialVersionUID = 1L;
    public static Integer ISVALIAD = 0;
    public static Integer NOTVALIAD = 1;
    @TableId(value = "id",type = IdType.UUID)
    private String id;
    /**
     * 所属人
     */
    @TableField("user_id")
    private String userId;
    /**
     * 状态
     */
    private String status;
    /**
     * 描述
     */
    private String description;

    /**
     * 内容
     */
    private String content;
    /**
     * 是否可用 0可1不可
     */
    @TableField("is_valid")
    private Integer isValid;
    @TableField("share_id")
    private String shareId;
    @TableField("community_id")
    private String communityId;
    @TableField("device_id")
    private String deviceId;
    /**
     * 二维码生成对象
     */
    private String target;
    //1门禁 0梯控
    private String type;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 是否删除  -1：已删除  0：正常
     */
    @TableField("del_flag")
    private String delFlag;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "GuardQrInfo{" +
        ", id=" + id +
        ", userId=" + userId +
        ", status=" + status +
        ", description=" + description +
        ", isValid=" + isValid +
        ", shareId=" + shareId +
        ", community_id=" + communityId +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", delFlag=" + delFlag +
        "}";
    }
}
